package StudyCode.summary.mycollection;

import java.util.Collections;
import java.util.Comparator;
import java.util.Vector;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class SortVectorInDescendingOrderUsingComparator {
	public static void main(String[] args) {
		Vector v = new Vector();
		v.add("1");
		v.add("2");
		v.add("3");
		v.add("4");
		v.add("5");

		Comparator comparator = Collections.reverseOrder();

		System.out.println("Vector 降序排序前 : " + v);

		Collections.sort(v, comparator);
		System.out.println("Vector 降序排序后 : " + v);
	}
}
